package com.inossem.warehousestorage_inossem.utils;

import android.content.Context;
import android.text.TextUtils;

import com.inossem.utils.base.GsonUtils;
import com.inossem.utils.io.IOUtils;
import com.inossem.warehousestorage_inossem.bean.up_frame.UpFrameOverviewBean;

/**
 * Created by leij on 2017/6/13.
 */

public class SPUtils {

    private static final String DEFAULT_DOMAIN = "61.134.122.146";

    private static final String DEFAULT_PORT = "80";

    private static final String SP_RETAIN = "Retain"; //保存数据

    private static final String SP_SYSTEM = "System";//系统信息

    private static final String SP_WAREHOUSESTORAGE = "WarehouseStorage";//业务信息

    private static final String KEY_DOMAIN = "Domain";//域名

    private static final String KEY_PORT = "Port";//端口

    private static final String KEY_FILE_SERVER_URL = "File_Server_Url";//文件服务器地址

    private static final String KEY_TOKEN = "Token";//Token

    private static final String KEY_LOGIN_USER_NAME = "Login_User_Name";//登录用户名

    private static final String KEY_NAME = "Name";//用户姓名

    private static final String KEY_LOGIN_FLAG = "Login_Flag";//登录状态

    private static final String KEY_RECEIVE_INFORMATION = "Receive_Information";//验收

    private static final String KEY_RECEIVE_INSTORAGE_INFORMATION = "Receive_In_Storage_Information";//验收入库

    private static final String KEY_ALLOCATING_INSTORAGE_INFORMATION = "Receive_In_Storage_Information";//调拨入库

    private static final String KEY_FREE_INSTORAGE_INFORMATION = "Free_In_Storage_Information";//免检入库

    private static final String KEY_FREE_INSTORAGE_BASE_INFO = "Free_In_Storage_Base_Info";//免检入库获取免检原因和工厂

    private static final String KEY_TENDERRECEIVE_INSTORAGE_BASE_INFO = "Receive_In_Storage_Base_Info";//招采入库获取工厂

    private static final String KEY_OTHER_INSTORAGE_INFORMATION = "Other_In_Storage_Information";//其他入库

    private static final String KEY_TENDER_INSTORAGE_INFORMATION = "Tender_In_Storage_Information";//招采入库

    private static final String KEY_PICKING_OUTSTORAGE_INFORMATION = "Picking_Out_Storage_Information";//领料出库

    private static final String KEY_ALLOTION_OUTSTORAGE_INFOR = "Allocation_Out_Storage_Infor";//調撥出库

    private static final String KEY_SALE_OUTSTORAGE_INFORMATION = "Sale_Out_Storage_Information";//销售出库

    private static final String KEY_RETURN_OUTSTORAGE_INFORMATION = "Return_Out_Storage_Information";//采购退货

    private static final String KEY_PRODUCTION_OUTSTORAGE_INFORMATION = "Production_Out_Storage_Information";//生产领用

    public static final String KEY_UP_FRAME_INFORMATION = "Up_Frame_Information"; //上架

//    public static final String KEY_STORAGE_MGR_MATR_INFORMATION = "Storage_Mgr_Information";

    public static final String KEY_CHANGE_STORAGE_INFORMATION = "Change_Storage_Information"; //转储管理

    public static final String KEY_PICKING_REFUND_STORAGE_INFORMATION = "Picking_Refund_Storage_Information"; //领料退库管理

    public static final String KEY_SALE_REFUND_STORAGE_INFORMATION = "Sale_Refund_Storage_Information"; //销售退库管理

    public static final String KEY_RESERVED_REFUND_STORAGE_INFORMATION = "Reserved_Refund_Storage_Information"; //预留退库管理

    public static final String KEY_INVENTORY_INTEGRATION_INFORMATION = "Inventory_Integration_Information"; //盘点整合

    private static final String KEY_EMERGANCY_WAREHOUSING_INFORMATION = "Receive_Emergancy_Warehousing_Information";//紧急出入库

    private static final String KEY_ALLOCATING_OUTSTORAGE_INFORMATION = "Allocating_Out_Storage_Information";//调拨出库

    private static final String KEY_OTHER_OUTSTORAGE_INFORMATION = "Other_oUT_Storage_Information";//其他出库

    private static final String KEY_STORAGE_MATERIEL_INFORMATION = "Storage_Materiel_Information";//仓库整理基于物料整理

    private static final String KEY_CHANGE_STORAGE_MATERIEL_LIST = "Change_Storage_Material_List";//转储物料列表

    private static final String KEY_IN_STORAGE_SHOPPING_OVERVIEW_LIST = "In_Storage_Shopping_OverView_List";//采购入库概览

    private static final String KEY_IN_STORAGE_PRODUCTION_OVERVIEW_LIST = "In_Storage_Production_OverView_List";//生产入库概览



    public static final String KEY_INVENTORY_INFORMATION = "Inventory_Information";//库存盘点

    public static final String KEY_ALLOCATION_IN_INFORMATION = "Inventory_Information";//调拨入库

    public static final void clearSystem(Context context) {
        IOUtils.clear(context, SP_SYSTEM);
    }

    public static final void clearWarehouseStorage(Context context) {
        IOUtils.clear(context, SP_WAREHOUSESTORAGE);
    }

    public static String getDomain(Context context) {
        return IOUtils.getString(context, SP_RETAIN, KEY_DOMAIN, DEFAULT_DOMAIN);
    }

    public static void saveDomain(Context context, String domain) {
        IOUtils.putString(context, SP_RETAIN, KEY_DOMAIN, domain);
    }

    public static String getPort(Context context) {
        return IOUtils.getString(context, SP_RETAIN, KEY_PORT, DEFAULT_PORT);
    }

    public static void savePort(Context context, String port) {
        IOUtils.putString(context, SP_RETAIN, KEY_PORT, port);
    }

    public static String getLoginUserName(Context context) {
        return IOUtils.getString(context, SPUtils.SP_RETAIN, KEY_LOGIN_USER_NAME, "");
    }

    public static void saveLoginUserName(Context context, String loginUserName) {
        IOUtils.putString(context, SP_RETAIN, KEY_LOGIN_USER_NAME, loginUserName);
    }

    public static String getToken(Context context) {
        return IOUtils.getString(context, SP_SYSTEM, KEY_TOKEN, "");
    }

    public static void saveToken(Context context, String token) {
        IOUtils.putString(context, SP_SYSTEM, KEY_TOKEN, token);
    }

    public static void removeToken(Context context) {
        IOUtils.remove(context, SP_SYSTEM, KEY_TOKEN);
    }

    public static String getFileServerUrl(Context context) {
        return IOUtils.getString(context, SP_SYSTEM, KEY_FILE_SERVER_URL, "http://61.134.122.146/wms/file/file");
    }

    public static void saveFileServerUrl(Context context, String fileServerUrl) {
        IOUtils.putString(context, SP_SYSTEM, KEY_FILE_SERVER_URL, fileServerUrl);
    }

    public static void removeFileServerUrl(Context context) {
        IOUtils.remove(context, SP_SYSTEM, KEY_FILE_SERVER_URL);
    }

    public static String getName(Context context) {
        return IOUtils.getString(context, SP_SYSTEM, KEY_NAME, "");
    }

    public static void saveName(Context context, String name) {
        IOUtils.putString(context, SP_SYSTEM, KEY_NAME, name);
    }

    public static void removeName(Context context) {
        IOUtils.remove(context, SP_SYSTEM, KEY_NAME);
    }

    public static boolean getLoginFlag(Context context) {
        return IOUtils.getBoolean(context, SP_SYSTEM, KEY_LOGIN_FLAG, false);
    }

    public static void saveLoginFlag(Context context, boolean loginFlag) {
        IOUtils.putBoolean(context, SP_SYSTEM, KEY_LOGIN_FLAG, loginFlag);
    }

    public static void removeLoginFlag(Context context) {
        IOUtils.remove(context, SP_SYSTEM, KEY_LOGIN_FLAG);
    }

    public static String getReceiveInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INFORMATION, "");
    }

    public static void saveReceiveInformation(Context context, String receiveInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INFORMATION, receiveInformation);
    }

    public static void removeReceiveInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INFORMATION);
    }

    public static String getReceiveInStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INSTORAGE_INFORMATION, "");
    }

    public static void saveReceiveInStorageInformation(Context context, String receiveInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INSTORAGE_INFORMATION, receiveInStorageInformation);
    }

    public static void removeReceiveInStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_RECEIVE_INSTORAGE_INFORMATION);
    }

    public static String getAllocatingInStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_INSTORAGE_INFORMATION, "");
    }

    public static void saveAllocatingInStorageInformation(Context context, String receiveInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_INSTORAGE_INFORMATION, receiveInStorageInformation);
    }

    public static void removeAllocatingInStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_INSTORAGE_INFORMATION);
    }

    public static String getFreeInStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_INFORMATION, "");
    }

    public static void saveFreeInStorageInformation(Context context, String freeInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_INFORMATION, freeInStorageInformation);
    }

    public static void removeFreeInStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_INFORMATION);
    }

    public static String getFreeInStorageBaseInfo(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_BASE_INFO, "");
    }

    public static void saveFreeInStorageBaseInfo(Context context, String freeInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_BASE_INFO, freeInStorageInformation);
    }

    public static void removeFreeInStorageBaseInfo(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_FREE_INSTORAGE_BASE_INFO);
    }

    public static String getTenderInStorageBaseInfo(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_TENDERRECEIVE_INSTORAGE_BASE_INFO, "");
    }

    public static void saveTenderInStorageBaseInfo(Context context, String freeInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_TENDERRECEIVE_INSTORAGE_BASE_INFO, freeInStorageInformation);
    }

    public static void removeTenderInStorageBaseInfo(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_TENDERRECEIVE_INSTORAGE_BASE_INFO);
    }

    public static String getOtherInStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_OTHER_INSTORAGE_INFORMATION, "");
    }

    public static void saveOtherInStorageInformation(Context context, String otherInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_OTHER_INSTORAGE_INFORMATION, otherInStorageInformation);
    }

    public static void removeOtherInStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_OTHER_INSTORAGE_INFORMATION);
    }

    public static String getOtherOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_OTHER_OUTSTORAGE_INFORMATION, "");
    }

    public static void saveOtherOutStorageInformation(Context context, String otherInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_OTHER_OUTSTORAGE_INFORMATION, otherInStorageInformation);
    }

    public static void removeOtherOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_OTHER_OUTSTORAGE_INFORMATION);
    }

    public static String getTenderInStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_TENDER_INSTORAGE_INFORMATION, "");
    }

    public static void saveTenderInStorageInformation(Context context, String tenderInStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_TENDER_INSTORAGE_INFORMATION, tenderInStorageInformation);
    }

    public static void removeTenderInStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_TENDER_INSTORAGE_INFORMATION);
    }

    public static String getPickingOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_PICKING_OUTSTORAGE_INFORMATION, "");
    }

    public static String getAllotionOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_ALLOTION_OUTSTORAGE_INFOR, "");
    }

    public static void savePickingOutStorageInformation(Context context, String pickingOutStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_PICKING_OUTSTORAGE_INFORMATION, pickingOutStorageInformation);
    }

    public static void saveAllocationOutStorageInformation(Context context, String allocationOutStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_ALLOTION_OUTSTORAGE_INFOR, allocationOutStorageInformation);
    }

    public static void removePickingOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_PICKING_OUTSTORAGE_INFORMATION);
    }

    public static void removeAllotionOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_ALLOTION_OUTSTORAGE_INFOR);
    }

    public static String getAllocatingOutStorageInformation(Context context) {
//        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_OUTSTORAGE_INFORMATION, "");
        return "";
    }

    public static void saveAllocatingOutStorageInformation(Context context, String pickingOutStorageInformation) {
//        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_OUTSTORAGE_INFORMATION, pickingOutStorageInformation);
    }

    public static void removeAllocatingOutStorageInformation(Context context) {
//        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATING_OUTSTORAGE_INFORMATION);
    }

    public static String getSaleOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_SALE_OUTSTORAGE_INFORMATION, "");
    }

    public static void saveSaleOutStorageInformation(Context context, String saleOutStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_SALE_OUTSTORAGE_INFORMATION, saleOutStorageInformation);
    }

    public static void removeSaleOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_SALE_OUTSTORAGE_INFORMATION);
    }

    public static String getReturnOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_RETURN_OUTSTORAGE_INFORMATION, "");
    }

    public static void saveReturnOutStorageInformation(Context context, String returnOutStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_RETURN_OUTSTORAGE_INFORMATION, returnOutStorageInformation);
    }

    public static void removeReturnOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_RETURN_OUTSTORAGE_INFORMATION);
    }

    public static String getProductionOutStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_PRODUCTION_OUTSTORAGE_INFORMATION, "");
    }

    public static void saveProductionOutStorageInformation(Context context, String pickingOutStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_PRODUCTION_OUTSTORAGE_INFORMATION, pickingOutStorageInformation);
    }

    public static void removeProductionOutStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_PRODUCTION_OUTSTORAGE_INFORMATION);
    }

    public static String getChangeStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_INFORMATION, "");
    }

    public static void saveChangeStorageInformation(Context context, String changeStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_INFORMATION, changeStorageInformation);
    }

    public static void removeChangeStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_INFORMATION);
    }

    public static String getPickingRefundStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_PICKING_REFUND_STORAGE_INFORMATION, "");
    }

    public static void savePickingRefundStorageInformation(Context context, String pickingRefundStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_PICKING_REFUND_STORAGE_INFORMATION, pickingRefundStorageInformation);
    }

    public static void removePickingRefundStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_PICKING_REFUND_STORAGE_INFORMATION);
    }

    public static String getSaleRefundStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_SALE_REFUND_STORAGE_INFORMATION, "");
    }

    public static void saveSaleRefundStorageInformation(Context context, String saleRefundStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_SALE_REFUND_STORAGE_INFORMATION, saleRefundStorageInformation);
    }

    public static void removeSaleRefundStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_SALE_REFUND_STORAGE_INFORMATION);
    }

    public static String getReservedRefundStorageInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_RESERVED_REFUND_STORAGE_INFORMATION, "");
    }

    public static void saveReservedRefundStorageInformation(Context context, String reservedRefundStorageInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_RESERVED_REFUND_STORAGE_INFORMATION, reservedRefundStorageInformation);
    }

    public static void removeReservedRefundStorageInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_RESERVED_REFUND_STORAGE_INFORMATION);
    }

    public static UpFrameOverviewBean getUpFrameInformation(Context context) {
        return getInformation(context, UpFrameOverviewBean.class, KEY_UP_FRAME_INFORMATION);
    }

    public static void saveUpFrameInformation(Context context, UpFrameOverviewBean bean) {
        saveInformation(context, KEY_UP_FRAME_INFORMATION, bean);
    }

    public static void removeUpFrameInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_UP_FRAME_INFORMATION);
    }

    public static String getInventoryIntegrationInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INTEGRATION_INFORMATION, "");
    }

    public static void saveInventoryIntegrationInformation(Context context, String inventoryIntegration) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INTEGRATION_INFORMATION, inventoryIntegration);
    }

    public static void removeInventoryIntegrationInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INTEGRATION_INFORMATION);
    }

    public static String getReceiveEmergencyWarehousingInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_EMERGANCY_WAREHOUSING_INFORMATION, "");
    }

    public static void saveReceiveEmergencyWarehousingInformation(Context context, String receiveEmergencyWarehousingInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_EMERGANCY_WAREHOUSING_INFORMATION, receiveEmergencyWarehousingInformation);
    }

    public static void removeReceiveEmergencyWarehousingInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_EMERGANCY_WAREHOUSING_INFORMATION);
    }

    public static String getStorageMaterielInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_STORAGE_MATERIEL_INFORMATION, "");
    }

    public static void saveStorageMaterielInformation(Context context, String storageMateriel) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_STORAGE_MATERIEL_INFORMATION, storageMateriel);
    }

    public static void removeStorageMaterielInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_STORAGE_MATERIEL_INFORMATION);
    }

    public static String getChangeStorageMaterielList(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_MATERIEL_LIST, "");
    }

    public static void saveChangeStorageMaterielList(Context context, String storageMateriel) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_MATERIEL_LIST, storageMateriel);
    }

    public static void removeChangeStorageMaterielList(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_CHANGE_STORAGE_MATERIEL_LIST);
    }

    public static String getInStorageShoppingOverViewlList(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_SHOPPING_OVERVIEW_LIST, "");
    }

    public static void saveInStorageShoppingOverViewlList(Context context, String storageMateriel) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_SHOPPING_OVERVIEW_LIST, storageMateriel);
    }

    public static void removeInStorageShoppingOverViewList(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_SHOPPING_OVERVIEW_LIST);
    }

    public static void saveInventoryInformation(Context context, String inventoryInformation) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INFORMATION, inventoryInformation);
    }

    public static String getInventoryInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INFORMATION, "");
    }

    public static void removeInventoryInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_INVENTORY_INFORMATION);
    }

    //调拨入库
    public static void saveAllocationInInformation(Context context, String info) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATION_IN_INFORMATION, info);
    }

    public static String getAllocationInInformation(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATION_IN_INFORMATION, "");
    }

    public static void removeAllocationInInformation(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_ALLOCATION_IN_INFORMATION);
    }

    public static String getInStorageProductionOverViewlList(Context context) {
        return IOUtils.getString(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_PRODUCTION_OVERVIEW_LIST, "");
    }

    public static void saveInStorageProductionOverViewlList(Context context, String storageMateriel) {
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_PRODUCTION_OVERVIEW_LIST, storageMateriel);
    }

    public static void removeInStorageProductionOverViewList(Context context) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, KEY_IN_STORAGE_PRODUCTION_OVERVIEW_LIST);
    }

    public static <T> T getInformation(Context context, Class<T> cla, String key) {
        String s = IOUtils.getString(context, SP_WAREHOUSESTORAGE, key, null);
        if (TextUtils.isEmpty(s)) {
            return null;
        } else {
            return GsonUtils.fromJson(s, cla);
        }

    }

    public static void saveInformation(Context context, String key, Object bean) {
        String json = GsonUtils.toJson(bean);
        IOUtils.putString(context, SP_WAREHOUSESTORAGE, key, json);
    }

    public static void removeInformation(Context context, String key) {
        IOUtils.remove(context, SP_WAREHOUSESTORAGE, key);
    }
}
